#ifndef EGG_SHADER_H
#define EGG_SHADER_H

#include "GraphicDevice.h"

namespace egg{

    class Shader{
    public:
        Shader(ShaderType _type);
        ~Shader();
    public:
        void compile(const char* _source);
        void load(const string& _fileName);
        string getCompiledSource();

        inline GLuint getID(){
            return mID;
        }
        inline int32 getVersion(){
            return mVersion;
        }
        inline ShaderType getType(){
            return mType;
        }
        inline GLenum getDeviceType(){
            return mDeviceType;
        }
    protected:
        void innerBuild(ShaderType _type);
    protected:
        GLuint mID;
        int32 mVersion;
        ShaderType mType;
        GLenum mDeviceType;
    };

    typedef shared_ptr<Shader> ShaderPtr;

}

#endif